package shape;

import java.awt.geom.Point2D;

public class Circle extends GenericShape2D {

	private static final int DEFAULT_RADIUS = 0;

	protected double radius;

	public Circle() {
		this(DEFAULT_POSITION, DEFAULT_RADIUS);
	}

	public Circle(Point2D position, double radius) {
		this.radius = radius;
		super.position = position;
	}

	public double getRadius() {
		return this.radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}

	public boolean contains(Point2D point) {
		return super.position.distance(point) - this.radius <= DEFAULT_PRECISION;
	}

}
